/**
 * jims
 */
package com.jims.master.modules.finance.entity;

import com.jims.master.modules.sys.entity.User;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotNull;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.jims.master.common.persistence.DataEntity;
import java.util.List;
/**
 * 结账主记录Entity
 * @author 赵宁
 * @version 2017-03-30
 */
public class InpAcctMaster extends DataEntity<InpAcctMaster> {
	
	private static final long serialVersionUID = 1L;
	private String acctNo;		// 结账号
	private String rcptsNum;		// 收据张数
	private String refundNum;		// 退费收据张数
	private String invalidNum;		// 作废收据张数
	private Double sumAmount;		// 总金额
	private Double chargesAmount;		// 实收金额
	private Date startDate;		// 开始日期
	private Date endDate;		// 结束日期
	private String orgId;		// 机构ID
	private String acctType;//结账类型 0：住院结账 1：预交金结账
	private User user;
	private List<InpAcctDetail> inpAcctDetailList;


	public InpAcctMaster() {
		super();
	}

	public InpAcctMaster(String id){
		super(id);
	}

	@Length(min=1, max=200, message="结账号长度必须介于 1 和 200 之间")
	public String getAcctNo() {
		return acctNo;
	}

	public void setAcctNo(String acctNo) {
		this.acctNo = acctNo;
	}
	
	@Length(min=1, max=11, message="收据张数长度必须介于 1 和 11 之间")
	public String getRcptsNum() {
		return rcptsNum;
	}

	public void setRcptsNum(String rcptsNum) {
		this.rcptsNum = rcptsNum;
	}
	
	@Length(min=1, max=11, message="退费收据张数长度必须介于 1 和 11 之间")
	public String getRefundNum() {
		return refundNum;
	}

	public void setRefundNum(String refundNum) {
		this.refundNum = refundNum;
	}
	
	@Length(min=1, max=11, message="作废收据张数长度必须介于 1 和 11 之间")
	public String getInvalidNum() {
		return invalidNum;
	}

	public void setInvalidNum(String invalidNum) {
		this.invalidNum = invalidNum;
	}
	
	@NotNull(message="总金额不能为空")
	public Double getSumAmount() {
		return sumAmount;
	}

	public void setSumAmount(Double sumAmount) {
		this.sumAmount = sumAmount;
	}
	
	@NotNull(message="实收金额不能为空")
	public Double getChargesAmount() {
		return chargesAmount;
	}

	public void setChargesAmount(Double chargesAmount) {
		this.chargesAmount = chargesAmount;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@NotNull(message="开始日期不能为空")
	public Date getStartDate() {
		return startDate;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@NotNull(message="结束日期不能为空")
	public Date getEndDate() {
		return endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}
	
	@Length(min=0, max=64, message="机构ID长度必须介于 0 和 64 之间")
	public String getOrgId() {
		return orgId;
	}

	public void setOrgId(String orgId) {
		this.orgId = orgId;
	}

	public String getAcctType() {
		return acctType;
	}

	public void setAcctType(String acctType) {
		this.acctType = acctType;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public List<InpAcctDetail> getInpAcctDetailList() {
		return inpAcctDetailList;
	}

	public void setInpAcctDetailList(List<InpAcctDetail> inpAcctDetailList) {
		this.inpAcctDetailList = inpAcctDetailList;
	}
}